Fix lots of windows tests
authorAlex Crichton <alex@alexcrichton.com>
Wed, 25 Jun 2014 05:06:11 +0000 (22:06 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 25 Jun 2014 18:15:04 +0000 (11:15 -0700)
commit80a81334f6d6799d2db00cd74f9bc88de3e0ae7c
tree606d35f6a14c8ab4d3c8977cb423436f42cac0e7
parentde5b7136cd89514104a926ec2c016ccf5328cf7f
Fix lots of windows tests

* Add a convenience method bin() for generating the name of a binary. On windows
  this remembers to append `.exe`.

* Stop executing relative paths to binaries and relying on PATH. This is
  suffering from rust-lang/rust#15149 and failing to spawn processes on windows.
  Additionally, this allows the tests to work with a pre-installed cargo becuase
  the freshly built executables are precisely specified.

* A new function, escape_path(), was added for tests. When generated source
  files with paths, this function needs to be called to properly escape the
  \-character that appears in windows path names. Without this function we would
  be generating invalid TOML and rust.
src/cargo/core/package_id.rs
tests/support/mod.rs
tests/test_cargo_compile.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_path_deps.rs